You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > Statistics.LaplaceFit Method
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
Statistics.LaplaceFit Method

Calculate parameters for Laplace distributed values.

Syntax
C#
Visual Basic
public static void LaplaceFit([In] TVec X, out double mu, out double b);
Parameters 
Description 
[In] TVec X 
Stores data which is assumed to be Laplace distributed. 
out double mu 
Return Laplace distribution parameter estimator M. 
out double b 
Return Laplace distribution parameter estimator b. 

RandomLaplace

The following example generates 100 random Laplace distributed values and then uses LaplaceFit routine to extract used Mu and b parameters

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples; { private void Example() { Vector Data = new Vector(100); StatRandom.RandomLaplace(3, 0.2, Data,-1); double mu, b; Statistics.LaplaceFit(Data, out mu, out b); // mu approx 3.0 // b approx 0.2 } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!